﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<BolsaWeb.Dominio.Ofertante>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Ofertante
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <% Html.EnableClientValidation(); %>

    <h2>Ofertante</h2>
    <table>
    <tr>
     <th></th>
     <th></th>
     <th></th>
    </tr>
   <% foreach(var item in Model) { %> 
    <tr>
     <td><%= item.RazonSocial  %></td>
     <td><%= item.NumeroRuc %></td>
     <td><%= item.Correo  %></td>
    </tr>
    <% } %>
    </table>
  <p>   
     <p> <% if (ViewData["User"] != null) {
             BolsaWeb.Dominio.Usuario user = ((BolsaWeb.Dominio.Usuario)ViewData["User"]);
             if (user.Tipo == BolsaWeb.Dominio.Usuario.OFERTANTE)
           { %>
      <%= Html.ActionLink("Editar mi perfil", "Edit", new { id = user.Id })%>
      <%}else{%>
          <%= Html.ActionLink("Nuevo", "Create")%>
      <%} 
           }%>
    </p>
</asp:Content>
